<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 有效性伪类 */
    input:valid {
      color: greenyellow;
    }
    input:invalid {
      color: red;
    }
  </style>
</head>
<body>
  邮箱：<input type="email"><br>
  邮箱：<input type="email"><br>
  手机号码：<input type="tel"><br>
  数字：<input type="range">

</body>
</html>